package com.dwms.controller;

import com.alibaba.fastjson.JSONObject;
import com.dwms.entity.Result;
import com.dwms.feign.base.PluginFeignClient;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Tag(name = "插件管理")
@RestController(value = "PluginController")
@RequestMapping(value = "/base/plugin")
@RequiredArgsConstructor
public class PluginController {

    private final PluginFeignClient pluginFeignClient;

    @Operation(summary= "查询仓库插件")
    @PostMapping("/getWarehousePlugins")
    public Result<List<JSONObject>> getWarehousePlugins() {
        return pluginFeignClient.getWarehousePlugins();
    }
}
